<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Cherry.js</title>
    <script src="../../Cherry.js"></script>

</head>

<body>
<!--    <input type="text">-->
<!--    <input type="password" style="position:relative">-->

    <div id="app"></div>
</body>
<script>
    new CherryMain({
        app:"app",
        child:[
            new CHE_Input({
                name:"settitle",
                margin:5,
                title:"Default 样式输入框",
                value:"",
                type:"Default",
                methods:{
                    click:(e,self)=>{
                        console.log(self.getText())
                    },
                    change:(e,self)=>{
                        console.log(self.getText())
                    },
                }
            }),
            new CHE_Input({
                name:"settext",
                margin:5,
                title:"Primary 样式输入框",
                value:"",
                type:"Primary",
            }),
            new CHE_Input({
                margin:5,
                title:"Success 样式输入框",
                value:"",
                type:"Success",
            }),
            new CHE_Input({
                margin:5,
                title:"Info 样式数字输入框",
                value:"",
                type:"Info",
                Itype:"number"
            }),
            new CHE_Input({
                margin:5,
                title:"Danger 样式密码输入框",
                value:"",
                type:"Danger",
                Itype:"pwd"
            }),
            new CHE_Container({
                height:20,
            }),
            new CHE_Button({
                text:"设置标题title",
                margin:5,
                methods:{
                    click:()=>{
                        $GET("#settitle").setTitle("设置之后的input");
                    }
                }
            }),
            new CHE_Button({
                text:"设置内容",
                margin:5,
                methods:{
                    click:()=>{
                        $GET("#settext").setText("设置内容的input");
                    }
                }
            }),
            new CHE_Button({
                text:"获取内容",
                margin:5,
                methods:{
                    click:()=>{
                        alert($GET("#settext").getText());
                    }
                }
            }),
        ],
        Created:()=>{

        }
    });



</script>
</html>